package com.liusiqi.db;

import org.springframework.stereotype.Component;

import java.sql.Connection;
import java.util.LinkedList;

/**
 * 数据库连接池
 */
@Component
public class DBPool {

    //连接池容器
    private static LinkedList<Connection> pool = new LinkedList<>();

    //连接池大小
    private final static int CONNECT_COUNT = 2;

    static {
        for (int i = 0; i < CONNECT_COUNT; i++) {
            pool.addLast(SqlConn);
        }
    }
}
